import com.huadi.domain.Teacher;
import com.huadi.service.TeacherService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class test {
    @Test
    public void test(){
        ApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("");
        TeacherService bean = (TeacherService) classPathXmlApplicationContext.getBean("TeacherServiceImpl");
        List<Teacher> teachers = bean.findTeachers();
        for (Teacher teacher : teachers) {
            System.out.println(teacher);
        }

    }
}
